package com.hzncc.flowable_diboot.vo.invoicemanage;

import com.diboot.core.binding.annotation.*;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamPosition;
import com.diboot.iam.entity.IamRole;
import com.diboot.iam.entity.IamUser;
import com.diboot.file.entity.FileRecord;
import com.diboot.tenant.entity.IamTenant;
import com.hzncc.flowable_diboot.entity.SapCustomer;
import com.hzncc.flowable_diboot.entity.invoicemanage.InvoiceProduct;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
import java.time.LocalDate;

/**
* 开票关联合同项目信息 VO定义
* @author MyName
* @version 1.0
* @date 2024-11-07
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class InvoiceProductListVO extends InvoiceProduct  {
private static final long serialVersionUID = 1556177209023057387L;

    /**
    * 租户 关联信息
    */
    @BindField(entity = IamTenant.class, field = "name", condition = "this.tenant_id = id")
    private String tenantIdLabel;

    /**
    * 创建人 关联信息
    */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.create_by = id")
    private String createByLabel;

    /**
    * 更新人 关联信息
    */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.update_by = id")
    private String updateByLabel;

    /**
     * 合同签订单位 关联信息
     */

    @BindField(
            entity = SapCustomer.class,
            field = "name",
            condition = "this.recipient = id"
    )
    private String recipientLabel;

    /**
     * 签订单位 关联信息
     */

    @BindField(
            entity = IamUser.class,
            field = "realname",
            condition = "this.signer = id"
    )
    private String signerLabel;

    /**
     * 签订单位 关联信息
     */

    @BindField(
            entity = IamUser.class,
            field = "userNum",
            condition = "this.signer = id"
    )
    private String signerNo;

    /**
     * 销售区域 关联字典选项
     */
    @BindDict(
            type = "salesArea",
            field = "salesTerritory"
    )
    private LabelValue salesTerritoryLabel;

    /**
     * 机床类型 关联字典选项
     */
    @BindDict(
            type = "salesContactMachineToolType",
            field = "machineToolType"
    )
    private LabelValue machineToolTypeLabel;

    /**
     * 业务板块 关联字典选项
     */
    //@BindDict(
    //        type = "contractBusinessModel",
    //        field = "businessModel"
    //)
    //private LabelValue businessModelLabel;

    /**
     * 档次 关联字典选项
     */
    @BindDict(
            type = "salesContractGrade",
            field = "grade"
    )
    private LabelValue gradeLabel;

    /**
     * 合同类型
     */
    @BindDict(
            type = "companyContractsType",
            field = "contractType"
    )
    private LabelValue contractTypeLabel;

    /**
     * 客户性质
     */
    @BindDict(
            type = "customerType",
            field = "customerType"
    )
    private LabelValue customerTypeLabel;

    /**
     * 付款方式
     */
    @BindDict(
            type = "paymentMethod",
            field = "payType"
    )
    private LabelValue payTypeLabel;

    /**
     * 账户分配
     */
    @BindDict(
            type = "accountAssignment",
            field = "accountAssignment"
    )
    private LabelValue accountAssignmentLabel;

}